//
//  CLExceptionsController.m
//  CareLink
//
//  Created by whong7 on 16/8/19.
//  Copyright © 2016年 Seven Team. All rights reserved.
//

#import "CLExceptionsController.h"

@interface CLExceptionsController ()

@property(nonatomic,weak)UITextView *textView;

@end

@implementation CLExceptionsController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
//    [self showNote];

}

-(void)setupUI
{
    self.view.backgroundColor = [UIColor colorWithHex:0xfbfbfb];
    

    //设置导航控制器标题
    self.navigationItem.title = @"免责条款";
    [self.navigationController.navigationBar setTitleTextAttributes:@{ NSForegroundColorAttributeName : [UIColor whiteColor], NSFontAttributeName : [UIFont systemFontOfSize:17] }];
#warning mark ---------设置返回按钮文字为空
    // 设置返回的按钮的文字为空
    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
    
    //MARK:设置scr
    UIScrollView *scr = [[UIScrollView alloc]initWithFrame:self.view.frame];
    scr.backgroundColor = [UIColor colorWithHex:0xfbfbfb];
    
    //创建label
    UILabel *notelabel = [UILabel labelWithText:@"预约须知" andTextColor:[UIColor blackColor] andFontSize:17];
    [notelabel sizeToFit];
    [scr addSubview:notelabel];
    //布局
    [notelabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(16);
        make.centerX.equalTo(scr);
    }];
    
    UIImageView *imageView = [[UIImageView alloc]init];
    imageView.image = [UIImage imageNamed:@"预约须知"];
    [scr addSubview:imageView];
    
    CGFloat pictureViewHeight = self.view.width * imageView.image.size.height/imageView.image.size.width;
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(notelabel.mas_bottom).offset(0);
        make.left.offset(0);
        make.width.offset(self.view.width);
        make.height.offset(pictureViewHeight);
    }];

    scr.contentSize = CGSizeMake(0,self.view.height+16);
    
    [self.view addSubview:scr];
}



@end
